package sh.wn36.vehiclemanage.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import sh.wn36.vehiclemanage.entity.AccidentRecord;
import sh.wn36.vehiclemanage.entity.dto.AccidentQuery;
import sh.wn36.vehiclemanage.mapper.AccidentRecordMapper;
import sh.wn36.vehiclemanage.service.AccidentRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xk
 * @since 2021-04-26
 */
@Service
public class AccidentRecordServiceImpl extends ServiceImpl<AccidentRecordMapper, AccidentRecord> implements AccidentRecordService {
    @Autowired
    AccidentRecordMapper accidentRecordMapper;
    @Override
    public List<Map<String,Object>> selectAccidentRecordMap(Page<Map<String, Object>> page, Wrapper wrapper) {
        return accidentRecordMapper.selectAccidentRecordMap(page,wrapper);
    }

    @Override
    public List<Map<String, Object>> reportList() {
        return accidentRecordMapper.reportList();
    }

    @Override
    public List<Map<String, Object>> queryReportByCarId(Integer carId) {
        return accidentRecordMapper.queryReportByCarId(carId);
    }
}
